<?php
class BaseCategoryModel  extends RelationModel{
    public $_link = array(
        'Share'=>array(
                'mapping_type' =>HAS_MANY,
                    'class_name'=>'Share',
                    'foreign_key'=>'category_id',
                    'mapping_name'=>'share',
        ),
        'UserHistory'=>array(
                'mapping_type' =>HAS_MANY,
                    'class_name'=>'UserHistory',
                    'foreign_key'=>'category_id',
                    'mapping_name'=>'history',
        ),
        'BaseCommodity'=>array(
                'mapping_type' =>HAS_MANY,
                    'class_name'=>'BaseCommodity',
                    'foreign_key'=>'category_id',
                    'mapping_name'=>'commodity',
        ),
        'BaseBrand'=>array(
                'mapping_type' =>HAS_MANY,
                    'class_name'=>'BaseBrand',
                    'foreign_key'=>'category_id',
                    'mapping_name'=>'brand',
        ),
       
         'UserCommodityScore'=>array(
                'mapping_type' =>HAS_MANY,
                    'class_name'=>'UserCommodityScore',
                    'foreign_key'=>'category_id',
                    'mapping_name'=>'CommodityScore',
        ),
    );
}
?>
